package tt.dz.order.vo;

import org.apache.commons.lang.StringUtils;

import tt.dz.order.exception.ParamLackException;
import tt.dz.order.exception.ParamNotFoundInSystemException;

/**
 * @Title 取消用户在某个电桩上，离当前时间最近的充电预约订单
 * @author zhoutian   
 * @date 2015-12-28
 */
public class CancelRecentChargeAppointmentVO {
	//用户ID
	private String userId;
	//桩的ID
	private String equipmentNo;
	//辅助设备编号,枪的编号
	private String auxEquipmentNo;

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getEquipmentNo() {
		return equipmentNo;
	}

	public void setEquipmentNo(String equipmentNo) {
		this.equipmentNo = equipmentNo;
	}

	public String getAuxEquipmentNo() {
		return auxEquipmentNo;
	}

	public void setAuxEquipmentNo(String auxEquipmentNo) {
		this.auxEquipmentNo = auxEquipmentNo;
	}

	public CancelRecentChargeAppointmentVO() {}
	
	public void validate() throws ParamLackException, ParamNotFoundInSystemException{
		if(StringUtils.isBlank(userId)){
			throw new ParamLackException("userId为空");
		}
		if(StringUtils.isBlank(equipmentNo)){
			throw new ParamLackException("equipmentNo为空");
		}
		if(StringUtils.isBlank(auxEquipmentNo)){
			throw new ParamLackException("auxEquipmentNo为空");
		}
	}
}
